1. Field of the Invention
The invention relates to an apparatus for controlling an electrical cooker and a method for detecting states of a plurality of touch switches, and more particularly to a micro-controller comprises a RC oscillator, a plurality of touch switches, a plurality of analog switches and two counters to simplify peripheral devices and utilize a software to adjust the sensitivity of the touch switches.
2. Description of the Related Art
In modern life, 3C products hold a large part of modern life. The consumer electronics become light, thin, short, small and smart. For example, an electrical magnetic cooker, a hotplate or a rice cooker, it is easy to use for cooking or heating food and only need electrical power. It is also safe than a cooker with gas and fire.
Generally, input devices of conventional electrical cookers are mechanical button. The shortage of the mechanical button is elasticity fatigue by frequently pressing, or shape changed because of high temperature. In other hand, some electrical cookers have touch switches, but it is complicated to design. Besides a basic micro-control unit, many different electric devices, for example, a device for adjusting the sensitivity of the touch switch, are also need. Consequently, it causes the higher cost.
Referring to FIG. 1, it is a functional block diagram of a conventional controller of an electrical cooker. The controller comprises a major micro-control unit 11, a driving circuit 12 coupled to the major micro-control unit 11 for driving a light-emitting diode 13, a panel control unit 14 coupled to coupled to the major micro-control unit 11 for data transmission, an analog switch 15 coupled to the panel control unit 14 for passing a signal received from a touch switch 16, a RC oscillator 17 for generating a frequency according to the composition of a RC circuit 18. The panel control unit 14 is able to determine the states (ON/OFF) of the touch switch 16 with software and transmits the states of the touch switch 16 to the major micro-control unit 11, and the driving circuit 12 is controlled by the major micro-control unit 11 to drive light-emitting diode 13 correspondingly. The software, however, may cause error/inaccuracy of the RC oscillator 17 because of timing of executing instructions. In the other hand, it is complex to combine the panel control unit 14 with other devices (15, 16, 17 and 18).
Referring to FIG. 2 and FIG. 3, it is a flowchart showing detection of the touch switches of the conventional controller. In the flowchart, we can find that calculating frequency of RC oscillator is after many steps including the counter counts, delay several milliseconds (step 193), stop the counter (step 197), read the content of the counter (step 197) and etc. It is understood that the conventional electrical cooker has many electric devices, the procedure is very complicated and also unstable.